//
//  Player.m
//  MyListenMusicFun
//
//  Created by dllo on 16/1/18.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "Player.h"

@implementation Player
+(Player *)shareInstance:(AVPlayerItem *)playerItem{
    static Player *player = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
//        [player pause];
        player = [Player playerWithPlayerItem:playerItem];
    });
    [player replaceCurrentItemWithPlayerItem:playerItem];
    return player;
}
@end